import request from '@/utils/request'
// import { makeFormData } from '@/utils/util'

export const api = {
  // coursesByArea: 'api/course_Package/list',
  // vendorsByCourse: 'api/vendor_course/getList',
  // courseInfo: 'api/vendor_course/get',
  coursesByArea: 'api/vendor_courseV2/getPackageList',
  weekListByCourse: 'api/vendor_courseV2/weekPackageList',
  vendorsByCourse: 'api/vendor_courseV2/weekCourseList',
  courseInfo: 'api/vendor_courseV2/getCourseDetails',
  weekDetail: 'api/vendor_courseV2/getWeekDetails',
  courseAppendix: 'api/vendor_courseV2/courseAppendix',
  courseV2Dict: 'api/vendor_courseV2/getData',
  categoryTypeByGuide: 'api/vendor_courseV2/categoryTypeByGuide'

}

export function getCoursesByArea (params = {}) {
  return request({
    url: api.coursesByArea,
    method: 'post',
    params
  })
}

export function getVendorsByCourse (params = {}) {
  return request({
    url: api.vendorsByCourse,
    method: 'post',
    params
  })
}

export function getCourseInfo (params = {}) {
  return request({
    url: api.courseInfo,
    method: 'post',
    params
  })
}

export function getCoursesByAreaV2 (params = {}) {
  return request({
    url: api.coursesByArea,
    method: 'post',
    params
  })
}

export function getWeekListByCourse (params = {}) {
  return request({
    url: api.weekListByCourse,
    method: 'post',
    params
  })
}

export function getVendorsByCourseV2 (params = {}) {
  return request({
    url: api.vendorsByCourse,
    method: 'post',
    params
  })
}

export function getCourseInfoV2 (params = {}) {
  return request({
    url: api.courseInfo,
    method: 'post',
    params
  })
}

export function getWeekDetails (params = {}) {
  return request({
    url: api.weekDetail,
    method: 'post',
    params
  })
}

export function getCourseAppendix (params = {}) {
  return request({
    url: api.courseAppendix,
    method: 'post',
    params
  })
}

export function getCourseDict (params = {}) {
  return request({
    url: api.courseV2Dict,
    method: 'post',
    params
  })
}

export function getCategoryTypeByGuide (params = {}) {
  return request({
    url: api.categoryTypeByGuide,
    method: 'post',
    params
  })
}
